package class3;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class demo1 {
    public static void main(String[] args) {
        FileInputStream inputStream=null;
        try {
            inputStream=new FileInputStream("D:\\temp\\ok.txt");
            int len=0;
            while(len!=-1){
                len= inputStream.read();
                System.out.print(len+"  ");
            }
        } catch (FileNotFoundException e) {
            System.out.println(e.getMessage());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            if (inputStream!=null){
                try {
                    inputStream.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }


    }
}
